<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
			<div class="widget-head">
				<div class="widget-title a m-cf">管理员列表</div>
			</div>
			<div class="widget-body layui-col-sm12 layui-col-md12 layui-col-lg12">
				<!-- 工具栏 -->
				<div class="page_toolbar">
					<div class="layui-form-item q-groups">
						<a class="layui-btn " href="{:url('auth/editUser')}"><i class="mdi menu-icon mdi-plus"></i> 新增</a>
					</div>
				</div>
				<div class="layui-col-md12" >
					<table width="100%" class="layui-table">
						<thead>
						<tr>
							<th>管理员ID</th>
							<th>用户名</th>
							<th>姓名</th>
							<th>添加时间</th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody>
						{if (isset($list))}
					   {volist name="list" id="item"}
							<tr>
								<td class="layer-text-middle">{$item['user_id']??''}</td>
								<td class="layer-text-middle"> {$item['user_name']??''}</td>
								<td class="layer-text-middle">{$item['real_name']??''}</td>
								<td class="layer-text-middle">{$item ['create_time']??''}</td>
								<td class="layer-text-middle">
									<div class="tpl-table-black-operation">												
									<a href="{:url('auth/editUser', ['user_id' => $item['user_id']])}">
									<i class="layer-icon-pencil"></i> 编辑 </a>
										{if $item.is_super!==0}
											<a href="javascript:void(0);" class="item-delete tpl-table-black-operation-del" data-id="{$item['user_id']}">
												<i class="layer-icon-trash"></i> 删除
											</a>
										{/if}
									</div>
								</td>
							</tr>
						{/volist}{else/}
							<tr>
								<td colspan="12" class="layer-text-center">暂无记录</td>
							</tr>
						{/if}
						</tbody>
					</table>
				</div>
				<div class="layui-col-lg12 layui-cf">
					<div class="layer-fr">{$list|raw}</div>
					<div class="layer-fr pagination-total layer-margin-right">
						<div class="layer-vertical-align-middle">总记录：{$list->total()}</div>
					</div>
				</div>
			</div>
        </div>
    </div>
</div>
<script>
    $(function () {

        // 删除元素
        var url = "{:url('auth/deleteUser')}";
        $('.item-delete').delete('user_id', url, '删除后不可恢复，确定要删除吗？');

    });
</script>

